
import couponApi from '../api/user'
import * as types from '../constants/ActionTypes'

//修改密码
const editPassword = () => ({
    type: types.EDIT_PASSWORD,
})

export const checkEditPasswordStatus = (data) => dispatch => {     
    return couponApi.editPassword(data,res => {
        dispatch(editPassword());
        dispatch(logOut());
    })    
}

//推出登录
const logOut = () => ({
    type: types.LOG_OUT,
})

export const checkLogOutStatus = (data) => dispatch => {         
    return couponApi.logOut(data,res => {
        dispatch(logOut());
    })       
}


